/*
 *  Copyright 2012 yura.
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */

package org.opu.pc.domain;

import java.util.Date;
import java.util.List;
import org.opu.pc.domain.domains.Publication;
import org.opu.pc.domain.domains.Publisher;

/**
 *
 * @author yura
 */
public interface PublicationManagement {

    List<Publication> list();

    List<Publication> searchByName(String name, Boolean wasApplied);

    /**
     * <ol>
     * This service can be performed for 3 actions:
     * <li>Publications of the publisher - if wasApplied is null</li>
     * <li>Applied publications of the publishers - if wasApplied is true</li>
     * <li>Not applied publications of the publishers - if wasApplied is false</li>
     * </ol>
     * @param publisher The author of the publications
     * @param wasApplied
     * @return
     */
    List<Publication> publicationsForPublisher(Integer publisherId,
            Boolean wasApplied);

    Publication createNew(Publication publication, List<Publisher> authors);

    void deletePublication(Integer id);

    void updatePublication(Publication publicationBean);

    List<Publication> getStudentsPublications(Date start, Date end);

    List<Publication> getProfessorPublications(Date start, Date end, Integer professorId);
}
